{% extends "admin/base_site.html" %}
{% load i18n admin_modify adminmedia sensorsdk %}

{% if help_content %}
{% block coltype %}colMS{% endblock %}
{% endif %}

{% block title %}{{ step }} | {% trans 'SensorSDK Setup' %}{% endblock %}

{% block branding %}
<h1 id="site-name">{% trans 'SensorSDK Setup' %}</h1>
{% endblock %}

{% block extrahead %}{{ block.super }}
    <script type="text/javascript" src="../../jsi18n/"></script>
    {{ media }}
{% endblock %}

{% block nav-global %}
<!-- a href="/sensorsdk" style="margin: 0 12px">{% trans 'SensorSDK Home' %}</a -->
{% endblock %}

{% block extrastyle %}

    {{ block.super }}
    
    <link rel="stylesheet" type="text/css" href="{% admin_media_prefix %}css/forms.css" />
    
    <style media="all" type="text/css">
	{% include "admin/sensorsdk/reset.css" %}
	{% include "admin/sensorsdk/base.css" %}
    </style>

{% endblock %}

{% block bodyclass %}email-setup change-form{% endblock %} 

{% block breadcrumbs %}
<div class="breadcrumbs">
     <a href="../">{% trans "Home" %}</a> &rsaquo;
     {{ step }}
</div>
{% endblock %} 

{% block content %}<div id="content-main">
	<form method="post" action="" id="{{ step_form  }}_form">
    	<div>
            {% if form.errors %}
            <p class="errornote">{% blocktrans count form.errors|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}</p>
            <ul class="errorlist">{% for error in form.non_field_errors %}<li>{{ error }}</li>{% endfor %}</ul>
            {% endif %}

	    <fieldset class="module aligned">
	    {% for field in form %}
	    <div class="form-row{% if field.errors %} errors{% endif %} field.label_tag">
		<div>
		    {% if field.field.is_checkbox %}
			{{ field }}<label class="vCheckboxLabel">{{ field.label }}</label>
		    {% else %}
			{{ field.label_tag }}{{ field }}
		    {% endif %}
		    {% if field.help_text %}<p class="help">{{ field.help_text|safe }}</p>{% endif %}
		</div>
		{{ field.errors }}
	    </div>
	    {% endfor %}
	    </fieldset>
	    {% include "admin/submit_line.html" %}
	</div>
    </form>
</div>

{% if help_content %}
    <div id="content-related" class="module aligned tiny help">
    <h2>{{ step  }}</h2>
    <br>
    {{ help_content|linebreaks }}
    <br>
    <br>
    </div>
{% endif %}
{% endblock %}
